1865, of unknown origin, perhaps in reference to Aleck Hoag, notorious pimp, thief, and confidence man in New York City in early 1840s [Barnhart]. See smart (adj.). Related: Smart-alecky.
: I asked you to come here to give us advice, not smart-aleck talk
noun phrasesmart-ass (1865+)
[perhaps fr Aleck Hoag, a thief whose fate was described in an 1844 book by George Wilkes]